package com.topisv.tms.web.Demo;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.topisv.tms.entity.User;
import com.topisv.tms.mybatis.Pagination;
import com.topisv.tms.service.test.DemoService;
import com.topisv.tms.web.base.BaseDataTableController;

/**
 * 用户_control
 * @author ch
 */
@Controller
@RequestMapping({ "/demo" })
public class DemoController extends BaseDataTableController{

	private static final Logger logger = LoggerFactory.getLogger(DemoController.class);

	@Autowired
	private DemoService testService;
	
	
	/**
	 * 查询站内信
	 * @param request
	 * @param response
	 * @return
	 */
	@RequestMapping(value = "getList")
	@ResponseBody
	public Object getList() {
	    Pagination userList = testService.getAllUser();
	    return userList;
	}
	
	@RequestMapping(value = "getUserList")
    @ResponseBody
    public Object getUserList(User user) {
	    List userList = testService.getUserList(user);
        return userList;
    }
}


